package designPattern.bridge桥接模式;

public abstract class Computer {

    protected Band band;

    public Computer(Band band) {
        this.band = band;
    }

    public abstract void show();
}

class Desktop extends Computer {
    public Desktop(Band band) {
        super(band);
    }

    @Override
    public void show() {
        band.info();
        System.out.println("台式机");
    }
}

class Laptop extends Computer {
    public Laptop(Band band) {
        super(band);
    }

    @Override
    public void show() {
        band.info();
        System.out.println("笔记本");
    }
}
